/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.dao;

import java.math.BigDecimal;

import com.sigmatrix.h5.entity.DisRebateDetail;
import com.sigmatrix.h5.web.mode.AccumulatedRebate;
import com.sigmatrix.h5.web.mode.RebateList.Detail;
import com.sigmatrix.sc.jdbc.common.dao.Dao;
import com.sigmatrix.sc.jdbc.common.lang.Page;

/**
 *@ClassName: DisRebateDetailDao
 *@Description: 
 *@author MH
 *@date 2017年8月11日 下午4:59:00
 */
public interface DisRebateDetailDao extends Dao<DisRebateDetail,Integer>{
	/**
	 * 根据经销商查询返利总和
	 *@Title: findTotalRebateByDealerId
	 *@Description: 
	 *@return Integer
	 *@author MH
	 *@date 2017年8月13日 下午3:03:47
	 *@param dealerId
	 *@return
	 *@throws DaoException
	 */
	BigDecimal findTotalRebateByDealerId(int dealerId);
	
	/**
	 * 
	 *@Title: statistic
	 *@Description: 
	 *@return AccumulatedRebate
	 *@author MH
	 *@date 2017年12月11日 下午4:47:46
	 *@param dealerId
	 *@return
	 */
	AccumulatedRebate statistic(Integer dealerId,Short dealerType);
	
	/**
	 * 
	 *@Title: agreeAndWithDraw
	 *@Description:
	 *@return List<Detail>
	 *@author MH
	 *@date 2018年2月6日 下午5:42:53
	 *@param dealerId
	 *@param dealerType
	 *@param pageNo
	 *@param pageSize
	 *@return
	 */
	Page<Detail> rebateList(int dealerId, Short dealerType, int pageNo, int pageSize);
	
}
